package com.yohann.designPattern.chain;

/**
 * <p>
 * 系别审批
 * </p>
 *
 * @author Yohann
 * @since 2021/2/13 18:47
 */
public class DepartmentApprove extends Approve {
    public DepartmentApprove(String name) {
        super(name);
    }

    @Override
    public void processRequest(PurchaseRequest request) {
        if (request.getPrice() <= 5000) {
            System.out.println("请求被DepartmentApprove处理");
        } else {
            approve.processRequest(request);
        }
    }
}